package org.styx.seata.tcc.order.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.styx.common.response.R;

import java.math.BigDecimal;

/**
 * 远程调用Account服务
 * @date 2021/8/10
 * @auther uranus
 */
@FeignClient(value="seata-tcc-account-service")
public interface AccountService {
    /**
     * 远程调用－扣减余额
     * @param userId
     * @param money
     * @return
     */
    @RequestMapping("/account/decrease")
    R decrease(@RequestParam("userId")Long userId,
               @RequestParam("money")BigDecimal money);
}
